package model;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class MaskineTest
{
	private Service service = Service.getInstance();
	@Before
	public void setUp() throws Exception
	{
		
	}

	@Test
	public void testBeregnDownTid()
	{
		assertEquals(384, (int)service.beregnDownTid(12-1, 2008, service.getMaskineList().get(0)));
		assertEquals(408, (int)service.beregnDownTid(1-1, 2009, service.getMaskineList().get(0)));
		assertEquals(240, (int)service.beregnDownTid(2-1, 2009, service.getMaskineList().get(1)));
		assertEquals(336, (int)service.beregnDownTid(3-1, 2009, service.getMaskineList().get(1)));
		assertEquals(360, (int)service.beregnDownTid(4-1, 2009, service.getMaskineList().get(2)));
		assertEquals(336, (int)service.beregnDownTid(1-1, 2009, service.getMaskineList().get(2)));
		assertEquals(744, (int)service.beregnDownTid(8-1, 2009, service.getMaskineList().get(2)));
		assertEquals(456, (int)service.beregnDownTid(9-1, 2009, service.getMaskineList().get(2)));
		
	}

}
